#
# RabbitMQ Dockerfile
#
# https://github.com/dockerfile/rabbitmq
#

# Pull base image.
FROM centos:6

# Add files.
ADD EwoMail /opt/EwoMail

# Install RabbitMQ.
RUN cd  /etc/yum.repos.d/ && \
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \
    yum clean all -y && yum makecache -y && yum update -y

# Set environment variables.
ENV HOME /root

# Define working directory.
WORKDIR /root

# Define working directory.
WORKDIR /data

#需要输入一个邮箱域名，不需要前缀，列如下面的ewomail.cn
CMD ["/mnt/swap","swap","swap","defaults","0","0"]
CMD ["sh","/opt/EwoMail/install/start.sh","TwpMail.cn"]

# Expose ports.
EXPOSE 8000
EXPOSE 8010